
var images = document.getElementsByTagName( 'img' );
var imagesUrl = new Array();
var selectedText = window.getSelection().toString();

for(
	var index = 0,
	picture,
	scale,
	pOriginalWidth,
	pOriginalHeight,
	pWidth,
	pHeight;
	index < images.length;
	index++ ) {
		if( images[index].width * images[index].height > 3000 ) {
			imagesUrl.push({ 
				'src': images[index].src,
				'width': images[index].width,
				'height': images[index].height }); }
}
	
if( imagesUrl.length > 0 || selectedText )
	chrome.extension.sendMessage({ 
		'validation': 'page-script',
		'imagesArray': imagesUrl,
		'selectedText': selectedText });
